
#ifndef FIFO_BUFFER_H_INC
#define FIFO_BUFFER_H_INC


#include <stdint.h>


class FifoBuffer
{
protected:
	uint8_t* m_bBuffer;
	uint32_t m_capacity;
	uint8_t  m_iPush;
	uint8_t  m_iPop;


public:
	FifoBuffer(uint16_t   capacity);
	virtual ~FifoBuffer();
	virtual uint32_t  Write(uint8_t* pbuf, uint32_t size);
	virtual uint32_t  Read(uint8_t* pbuf, uint32_t size);
	virtual uint32_t  TotalSize();
	virtual uint32_t  FreeSize();
	virtual void  Reset();
	virtual uint32_t  OccupySize();
};



#endif